
<template>
    <div class="tax-code-tax-rate-page">
        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
            <!-- 维修站备件抽样比例 -->
            <el-tab-pane :label="nowLangue.maintenanceSpareSampling" name="1">
                <v-MaintenanceSpareSampling></v-MaintenanceSpareSampling>
            </el-tab-pane>
            <!-- 维修站抽样比例 -->
            <el-tab-pane :label="nowLangue.maintenanceSampling" name="2">
                <v-MaintenanceSampling></v-MaintenanceSampling>
            </el-tab-pane>
            <!--备件抽样比例-->
            <el-tab-pane :label="nowLangue.spareSampling" name="3">
                <v-SpareSampling></v-SpareSampling>
            </el-tab-pane>
            <!--产品线抽样比例-->
            <el-tab-pane :label="nowLangue.productLineSampling" name="4">
                <v-ProductLineSampling></v-ProductLineSampling>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                language:{
                    zh:{
                        "maintenanceSpareSampling":"维修站备件抽样比例",
                        "maintenanceSampling":"维修站抽样比例",
                        "spareSampling":"备件抽样比例",
                        "productLineSampling":"产品线抽样比例"
                    },
                    en:{
                        "maintenanceSpareSampling":"maintenanceSpareSampling",
                        "maintenanceSampling":"maintenanceSampling",
                        "spareSampling":"spareSampling",
                        "productLineSampling":"productLineSampling"
                    }
                },
                nowLangue:{},
                activeName: '1',
            };
        },
        created:function(){
            var _this=this;
            _this.languageType=="zh"?_this.nowLangue=_this.language.zh:_this.nowLangue=_this.language.en;
        },
        computed:{
            languageType(){
                return this.$store.state.languageType;
            }
        },
        watch:{
            languageType(){
                var _this=this;
                _this.languageType=="zh"?_this.nowLangue=_this.language.zh:_this.nowLangue=_this.language.en;
            }
        },
        //进入页面立即运行此方法
        mounted: function () {
            var _this = this;
            _this.$store.commit('currentActive', 'NTFsampling');

        },
        methods:{
            handleClick(tab, event) {
                /*if(this.activeName=='1'){
                 this.queryEngineer(); // 查询 工程替换组明细
                 }else if(this.activeName=='2'){
                 this.queryFree();  // 查询  自由备件列表
                 }*/
            },
        }
    }
</script>